package org.br.plotter.functions.embededFunctons;

import org.br.plotter.functions.*;

public class MultiDimensionalFunction implements EmbededFunctionExecuter {
	public double executeFunction(double[] params) {
		double x = params[0];
		double multiplier = params[1];
		double constantParam = params[2];
		multiplier = multiplier * x + constantParam;
		for (int i = 3; i < params.length; i++) {
			constantParam = params[i];
			multiplier = multiplier * x + constantParam;
		}
		return multiplier;
	}

}